//
//  UIView+MCAutoFill.m
//  MirkoLibTest
//
//  Created by Mirko on 2017/3/22.
//  Copyright © 2017年 Mirko. All rights reserved.
//

#import "UIView+MCAutoFill.h"

@implementation UIView (MCAutoFill)

-(void) autoFill:(NSString *) string
{
    if ([self isMemberOfClass:[UITextField class]]) {
        UITextField *textField = (UITextField *)self;
        textField.text = string;
    }
    else if ([self isMemberOfClass:[UITextView class]])
    {
        UITextView *textView = (UITextView *)self;
        textView.text = string;
    }
    else if ([self isMemberOfClass:[UILabel class]])
    {
        UILabel *lable = (UILabel *)self;
        lable.text = string;
    }
    else
    {
        
    }
}


@end
